﻿/********************************************************************
	file base:	PucConfig
	file ext:	cs
	author:		mcvrlab
	
	purpose:	 配置文件读取
*********************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Web;
using System.Web.UI;

namespace COMM
{
    public class PucConfig
    {
        public static string ConnectionString
        {
            get
            {
                //string _connectionString = ConfigurationSettings.AppSettings["connstring"];
                //string ConStringEncrypt = ConfigurationSettings.AppSettings["ConStringEncrypt"];
                //if (ConStringEncrypt.ToLower() == "true")
                //{
                //    // _connectionString = DESEncrypt.Decrypt(_connectionString);

                //}
               // return "Data Source=127.0.0.1;Initial Catalog=test1;user id=sa;password=123456;min pool size=1;max pool size=20;";
                return "";
            }
        }
        public static string ConnectionStringA {

            get {

                //string _strconn = ConfigurationSettings.AppSettings["connstringa"];

                //return _strconn;

                return "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" + HttpContext.Current.Server.MapPath("/App_Data/mcshop.mdb");
                //return "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=E:\\bak\test0218\\Test4\\Shop\\App_Data\\mcshop.mdb";  
                //dbname=server.mappath("authors.mdb")
    //myConnection = New OleDbConnection( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source="&dbname )

            }
        
        } 
        
        public static string ConnectionStringDE
        {
            get
            {
               // string _connectionString = ConfigurationSettings.AppSettings["connstring"];
                //string ConStringEncrypt = ConfigurationSettings.AppSettings["ConStringEncrypt"];
                //if (ConStringEncrypt.ToLower() == "true")
                //{
                //    // _connectionString = DESEncrypt.Decrypt(_connectionString);

                //}
                // return "Data Source=127.0.0.1;Initial Catalog=test1;user id=sa;password=123456;min pool size=1;max pool size=20;";
                return "Data Source=127.0.0.1;Initial Catalog=test4;user id=sa;password=123456;min pool size=1;max pool size=20;";
            }
        }
    }
}
